import com.oneheart.xp.plugin.common.utils.ListSQLParaHelper;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class Test20201104 {
    public static void main(String[] args) {
/*        System.out.println(new BigDecimal(0.1));

        Double a1 = 4107.14, b1 = 657.14, c1 = 3450.0;
        System.out.println(a1 - b1);
        System.out.println(c1);
        System.out.println((a1 - b1) == c1);

        Double a2 = 4443.14,b2 = 4442.14,c2 = 1.0;
        System.out.println(a2 - b2);
        System.out.println(c2);
        System.out.println((a2 - b2) == c2);*/

        List<Object> list1 = new ArrayList<>();
        List<Object> list2 = new ArrayList<>();
        StringBuilder sb = new StringBuilder();
        sb.append("test");
        ListSQLParaHelper.addSql_LIKE_Expr(true,sb, list1,"user.user_id","123");
        System.out.println("addSql_LIKE_Expr :" + list1);
        ListSQLParaHelper.addSql_LIKE(true,sb, list2,"user.user_id","456");
        System.out.println("addSql_LIKE :" + list2);

        /*
        * notes:
        * 1.第一个参数是，SQL里面是否有 where ，true，有就不加 where ，false 就加上，并且把这个值变为 true
        * 2.第二个参数是 StringBuilder 不是 String，参数错了会标红（里面会调用 StringBuilder 的 append 方法）
        * 3.
        * */
//        BigDecimal used_amount = new BigDecimal("1"),quota_amount = new BigDecimal("2"),in_quota_amount = new BigDecimal("-1");
//        String result1 = "";
//        used_amount.add
//        System.out.println();
    }
}
